package com.fauks.study.dubbo.consumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.fauks.study.dubbo.api.bean.Order;
import com.fauks.study.dubbo.api.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class OrderController {

    @Reference
    private OrderService orderService;

    @GetMapping("orderList")
    public List<Order> orderList() {
        return orderService.getOrderList();
    }

}
